<?php
// +----------------------------------------------------------------------
// | ThinkPHP
// +----------------------------------------------------------------------
// | Copyright (c) 2008 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
//产品模型
class GoodsCategroyModel extends CommonModel {
	protected $_validate = array(
        array('category','require','分类必填'),
        array('product_name','require','产品名称必填'),
		array('product_name','','产品名称已经存在！',1,'unique',3),
		array('price','require','单价必填'),
		);

	protected $_auto	=	array(
		array('product_code','uniqid',self::MODEL_INSERT,'function'),
/*		array('create_time','time',self::MODEL_INSERT,'function'),
		array('update_time','time',self::MODEL_BOTH,'function'),
        array('member_id','getMemberId',self::MODEL_INSERT,'callback'),*/
		);
}
?>